import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listAdvertising(query) {
  return request({
    url: '/smy/mallAdvertising/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getAdvertising(id) {
  return request({
    url: '/smy/mallAdvertising/' + id,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addAdvertising(data) {
  return request({
    url: '/smy/mallAdvertising',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateAdvertising(data) {
  return request({
    url: '/smy/mallAdvertising',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delAdvertising(id) {
  return request({
    url: '/smy/mallAdvertising/' + id,
    method: 'delete'
  })
}

export function changeAdvertisingStatus(data) {
  return request({
    url: '/smy/mallAdvertising/changeAdvertisingStatus',
    method: 'post',
    data: data
  })
}
